<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en"><head>

<meta charset="utf-8">
<meta name="generator" content="quarto-99.9.9">

<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes">


<title>Fastmath documentation – Polynomials</title>
<style>
code{white-space: pre-wrap;}
span.smallcaps{font-variant: small-caps;}
div.columns{display: flex; gap: min(4vw, 1.5em);}
div.column{flex: auto; overflow-x: auto;}
div.hanging-indent{margin-left: 1.5em; text-indent: -1.5em;}
ul.task-list{list-style: none;}
ul.task-list li input[type="checkbox"] {
  width: 0.8em;
  margin: 0 0.8em 0.2em -1em; /* quarto-specific, see https://github.com/quarto-dev/quarto-cli/issues/4556 */ 
  vertical-align: middle;
}
/* CSS for syntax highlighting */
pre > code.sourceCode { white-space: pre; position: relative; }
pre > code.sourceCode > span { line-height: 1.25; }
pre > code.sourceCode > span:empty { height: 1.2em; }
.sourceCode { overflow: visible; }
code.sourceCode > span { color: inherit; text-decoration: inherit; }
div.sourceCode { margin: 1em 0; }
pre.sourceCode { margin: 0; }
@media screen {
div.sourceCode { overflow: auto; }
}
@media print {
pre > code.sourceCode { white-space: pre-wrap; }
pre > code.sourceCode > span { text-indent: -5em; padding-left: 5em; }
}
pre.numberSource code
  { counter-reset: source-line 0; }
pre.numberSource code > span
  { position: relative; left: -4em; counter-increment: source-line; }
pre.numberSource code > span > a:first-child::before
  { content: counter(source-line);
    position: relative; left: -1em; text-align: right; vertical-align: baseline;
    border: none; display: inline-block;
    -webkit-touch-callout: none; -webkit-user-select: none;
    -khtml-user-select: none; -moz-user-select: none;
    -ms-user-select: none; user-select: none;
    padding: 0 4px; width: 4em;
  }
pre.numberSource { margin-left: 3em;  padding-left: 4px; }
div.sourceCode
  {   }
@media screen {
pre > code.sourceCode > span > a:first-child::before { text-decoration: underline; }
}
</style>


<script src="site_libs/quarto-nav/quarto-nav.js"></script>
<script src="site_libs/quarto-nav/headroom.min.js"></script>
<script src="site_libs/clipboard/clipboard.min.js"></script>
<script src="site_libs/quarto-search/autocomplete.umd.js"></script>
<script src="site_libs/quarto-search/fuse.min.js"></script>
<script src="site_libs/quarto-search/quarto-search.js"></script>
<meta name="quarto:offset" content="./">
<link href="./special.html" rel="next">
<link href="./stats.html" rel="prev">
<link href="./clay/resources/favicon.png" rel="icon" type="image/png">
<script src="site_libs/quarto-html/quarto.js"></script>
<script src="site_libs/quarto-html/popper.min.js"></script>
<script src="site_libs/quarto-html/tippy.umd.min.js"></script>
<script src="site_libs/quarto-html/anchor.min.js"></script>
<link href="site_libs/quarto-html/tippy.css" rel="stylesheet">
<link href="site_libs/quarto-html/quarto-syntax-highlighting.css" rel="stylesheet" id="quarto-text-highlighting-styles">
<script src="site_libs/bootstrap/bootstrap.min.js"></script>
<link href="site_libs/bootstrap/bootstrap-icons.css" rel="stylesheet">
<link href="site_libs/bootstrap/bootstrap.min.css" rel="stylesheet" id="quarto-bootstrap" data-mode="light">
<script id="quarto-search-options" type="application/json">{
  "location": "sidebar",
  "copy-button": false,
  "collapse-after": 3,
  "panel-placement": "start",
  "type": "textbox",
  "limit": 50,
  "keyboard-shortcut": [
    "f",
    "/",
    "s"
  ],
  "show-item-context": false,
  "language": {
    "search-no-results-text": "No results",
    "search-matching-documents-text": "matching documents",
    "search-copy-link-title": "Copy link to search",
    "search-hide-matches-text": "Hide additional matches",
    "search-more-match-text": "more match in this document",
    "search-more-matches-text": "more matches in this document",
    "search-clear-button-title": "Clear",
    "search-text-placeholder": "",
    "search-detached-cancel-button-title": "Cancel",
    "search-submit-button-title": "Submit",
    "search-label": "Search"
  }
}</script>


</head>

<body class="nav-sidebar floating">

<div id="quarto-search-results"></div>
  <header id="quarto-header" class="headroom fixed-top">
  <nav class="quarto-secondary-nav">
    <div class="container-fluid d-flex">
      <button type="button" class="quarto-btn-toggle btn" data-bs-toggle="collapse" data-bs-target=".quarto-sidebar-collapse-item" aria-controls="quarto-sidebar" aria-expanded="false" aria-label="Toggle sidebar navigation" onclick="if (window.quartoToggleHeadroom) { window.quartoToggleHeadroom(); }">
        <i class="bi bi-layout-text-sidebar-reverse"></i>
      </button>
        <nav class="quarto-page-breadcrumbs" aria-label="breadcrumb"><ol class="breadcrumb"><li class="breadcrumb-item"><a href="./polynomials.html">Polynomials</a></li></ol></nav>
        <a class="flex-grow-1" role="button" data-bs-toggle="collapse" data-bs-target=".quarto-sidebar-collapse-item" aria-controls="quarto-sidebar" aria-expanded="false" aria-label="Toggle sidebar navigation" onclick="if (window.quartoToggleHeadroom) { window.quartoToggleHeadroom(); }">      
        </a>
      <button type="button" class="btn quarto-search-button" aria-label="" onclick="window.quartoOpenSearch();">
        <i class="bi bi-search"></i>
      </button>
    </div>
  </nav>
</header>
<!-- content -->
<div id="quarto-content" class="quarto-container page-columns page-rows-contents page-layout-article">
<!-- sidebar -->
  <nav id="quarto-sidebar" class="sidebar collapse collapse-horizontal quarto-sidebar-collapse-item sidebar-navigation floating overflow-auto">
    <div class="pt-lg-2 mt-2 text-left sidebar-header">
    <div class="sidebar-title mb-0 py-0">
      <a href="./">Fastmath documentation</a> 
    </div>
      </div>
        <div class="mt-2 flex-shrink-0 align-items-center">
        <div class="sidebar-search">
        <div id="quarto-search" class="" title="Search"></div>
        </div>
        </div>
    <div class="sidebar-menu-container"> 
    <ul class="list-unstyled mt-1">
        <li class="sidebar-item">
  <div class="sidebar-item-container"> 
  <a href="./index.html" class="sidebar-item-text sidebar-link">
 <span class="menu-text">Preface</span></a>
  </div>
</li>
        <li class="sidebar-item">
  <div class="sidebar-item-container"> 
  <a href="./core.html" class="sidebar-item-text sidebar-link">
 <span class="menu-text">Core</span></a>
  </div>
</li>
        <li class="sidebar-item">
  <div class="sidebar-item-container"> 
  <a href="./vector_matrix.html" class="sidebar-item-text sidebar-link">
 <span class="menu-text">Vectors and matrices</span></a>
  </div>
</li>
        <li class="sidebar-item">
  <div class="sidebar-item-container"> 
  <a href="./random.html" class="sidebar-item-text sidebar-link">
 <span class="menu-text">Random</span></a>
  </div>
</li>
        <li class="sidebar-item">
  <div class="sidebar-item-container"> 
  <a href="./stats.html" class="sidebar-item-text sidebar-link">
 <span class="menu-text">Statistics</span></a>
  </div>
</li>
        <li class="sidebar-item">
  <div class="sidebar-item-container"> 
  <a href="./polynomials.html" class="sidebar-item-text sidebar-link active">
 <span class="menu-text">Polynomials</span></a>
  </div>
</li>
        <li class="sidebar-item">
  <div class="sidebar-item-container"> 
  <a href="./special.html" class="sidebar-item-text sidebar-link">
 <span class="menu-text">Special functions</span></a>
  </div>
</li>
        <li class="sidebar-item">
  <div class="sidebar-item-container"> 
  <a href="./calculus.html" class="sidebar-item-text sidebar-link">
 <span class="menu-text">Calculus</span></a>
  </div>
</li>
        <li class="sidebar-item">
  <div class="sidebar-item-container"> 
  <a href="./interpolation.html" class="sidebar-item-text sidebar-link">
 <span class="menu-text">Interpolation</span></a>
  </div>
</li>
        <li class="sidebar-item">
  <div class="sidebar-item-container"> 
  <a href="./optimization.html" class="sidebar-item-text sidebar-link">
 <span class="menu-text">Optimization</span></a>
  </div>
</li>
        <li class="sidebar-item">
  <div class="sidebar-item-container"> 
  <a href="./transform.html" class="sidebar-item-text sidebar-link">
 <span class="menu-text">Transforms</span></a>
  </div>
</li>
        <li class="sidebar-item">
  <div class="sidebar-item-container"> 
  <a href="./ml.html" class="sidebar-item-text sidebar-link">
 <span class="menu-text">Machine Learning</span></a>
  </div>
</li>
        <li class="sidebar-item">
  <div class="sidebar-item-container"> 
  <a href="./complex_quaternions.html" class="sidebar-item-text sidebar-link">
 <span class="menu-text">Complex numbers and quaternions</span></a>
  </div>
</li>
        <li class="sidebar-item">
  <div class="sidebar-item-container"> 
  <a href="./easings.html" class="sidebar-item-text sidebar-link">
 <span class="menu-text">Easings</span></a>
  </div>
</li>
        <li class="sidebar-item">
  <div class="sidebar-item-container"> 
  <a href="./fields.html" class="sidebar-item-text sidebar-link">
 <span class="menu-text">Vector fields</span></a>
  </div>
</li>
        <li class="sidebar-item">
  <div class="sidebar-item-container"> 
  <a href="./efloat.html" class="sidebar-item-text sidebar-link">
 <span class="menu-text">EFloat</span></a>
  </div>
</li>
    </ul>
    </div>
</nav>
<div id="quarto-sidebar-glass" class="quarto-sidebar-collapse-item" data-bs-toggle="collapse" data-bs-target=".quarto-sidebar-collapse-item"></div>
<!-- margin-sidebar -->
    <div id="quarto-margin-sidebar" class="sidebar margin-sidebar">
        <nav id="TOC" role="doc-toc" class="toc-active">
    <h2 id="toc-title">Table of contents</h2>
   
  <ul>
  <li><a href="#reference" id="toc-reference" class="nav-link active" data-scroll-target="#reference">Reference</a>
  <ul>
  <li><a href="#fastmath.polynomials" id="toc-fastmath.polynomials" class="nav-link" data-scroll-target="#fastmath.polynomials">fastmath.polynomials</a>
  <ul>
  <li><a href="#polynomial" id="toc-polynomial" class="nav-link" data-scroll-target="#polynomial">-&gt;Polynomial</a></li>
  <li><a href="#polynomialr" id="toc-polynomialr" class="nav-link" data-scroll-target="#polynomialr">-&gt;PolynomialR</a></li>
  <li><a href="#add" id="toc-add" class="nav-link" data-scroll-target="#add">add</a></li>
  <li><a href="#bessel-t" id="toc-bessel-t" class="nav-link" data-scroll-target="#bessel-t">bessel-t</a></li>
  <li><a href="#bessel-y" id="toc-bessel-y" class="nav-link" data-scroll-target="#bessel-y">bessel-y</a></li>
  <li><a href="#chebyshev-t" id="toc-chebyshev-t" class="nav-link" data-scroll-target="#chebyshev-t">chebyshev-T</a></li>
  <li><a href="#chebyshev-u" id="toc-chebyshev-u" class="nav-link" data-scroll-target="#chebyshev-u">chebyshev-U</a></li>
  <li><a href="#chebyshev-v" id="toc-chebyshev-v" class="nav-link" data-scroll-target="#chebyshev-v">chebyshev-V</a></li>
  <li><a href="#chebyshev-w" id="toc-chebyshev-w" class="nav-link" data-scroll-target="#chebyshev-w">chebyshev-W</a></li>
  <li><a href="#coeffs" id="toc-coeffs" class="nav-link" data-scroll-target="#coeffs">coeffs</a></li>
  <li><a href="#coeffs-polynomial" id="toc-coeffs-polynomial" class="nav-link" data-scroll-target="#coeffs-polynomial">coeffs-&gt;polynomial</a></li>
  <li><a href="#coeffs-ratio-polynomial" id="toc-coeffs-ratio-polynomial" class="nav-link" data-scroll-target="#coeffs-ratio-polynomial">coeffs-&gt;ratio-polynomial</a></li>
  <li><a href="#complex-evalpoly" id="toc-complex-evalpoly" class="nav-link" data-scroll-target="#complex-evalpoly">complex-evalpoly</a></li>
  <li><a href="#complex-makepoly" id="toc-complex-makepoly" class="nav-link" data-scroll-target="#complex-makepoly">complex-makepoly</a></li>
  <li><a href="#complex-mevalpoly-macro" id="toc-complex-mevalpoly-macro" class="nav-link" data-scroll-target="#complex-mevalpoly-macro">complex-mevalpoly <sup><sub>MACRO</sub></sup></a></li>
  <li><a href="#complex-muladd" id="toc-complex-muladd" class="nav-link" data-scroll-target="#complex-muladd">complex-muladd</a></li>
  <li><a href="#degree" id="toc-degree" class="nav-link" data-scroll-target="#degree">degree</a></li>
  <li><a href="#derivative" id="toc-derivative" class="nav-link" data-scroll-target="#derivative">derivative</a></li>
  <li><a href="#eval-bessel-t" id="toc-eval-bessel-t" class="nav-link" data-scroll-target="#eval-bessel-t">eval-bessel-t</a></li>
  <li><a href="#eval-bessel-y" id="toc-eval-bessel-y" class="nav-link" data-scroll-target="#eval-bessel-y">eval-bessel-y</a></li>
  <li><a href="#eval-chebyshev-t" id="toc-eval-chebyshev-t" class="nav-link" data-scroll-target="#eval-chebyshev-t">eval-chebyshev-T</a></li>
  <li><a href="#eval-chebyshev-u" id="toc-eval-chebyshev-u" class="nav-link" data-scroll-target="#eval-chebyshev-u">eval-chebyshev-U</a></li>
  <li><a href="#eval-chebyshev-v" id="toc-eval-chebyshev-v" class="nav-link" data-scroll-target="#eval-chebyshev-v">eval-chebyshev-V</a></li>
  <li><a href="#eval-chebyshev-w" id="toc-eval-chebyshev-w" class="nav-link" data-scroll-target="#eval-chebyshev-w">eval-chebyshev-W</a></li>
  <li><a href="#eval-gegenbauer-c" id="toc-eval-gegenbauer-c" class="nav-link" data-scroll-target="#eval-gegenbauer-c">eval-gegenbauer-C</a></li>
  <li><a href="#eval-hermite-h" id="toc-eval-hermite-h" class="nav-link" data-scroll-target="#eval-hermite-h">eval-hermite-H</a></li>
  <li><a href="#eval-hermite-he" id="toc-eval-hermite-he" class="nav-link" data-scroll-target="#eval-hermite-he">eval-hermite-He</a></li>
  <li><a href="#eval-jacobi-p" id="toc-eval-jacobi-p" class="nav-link" data-scroll-target="#eval-jacobi-p">eval-jacobi-P</a></li>
  <li><a href="#eval-laguerre-l" id="toc-eval-laguerre-l" class="nav-link" data-scroll-target="#eval-laguerre-l">eval-laguerre-L</a></li>
  <li><a href="#eval-legendre-p" id="toc-eval-legendre-p" class="nav-link" data-scroll-target="#eval-legendre-p">eval-legendre-P</a></li>
  <li><a href="#eval-meixner-pollaczek-p" id="toc-eval-meixner-pollaczek-p" class="nav-link" data-scroll-target="#eval-meixner-pollaczek-p">eval-meixner-pollaczek-P</a></li>
  <li><a href="#evalpoly" id="toc-evalpoly" class="nav-link" data-scroll-target="#evalpoly">evalpoly</a></li>
  <li><a href="#evaluate" id="toc-evaluate" class="nav-link" data-scroll-target="#evaluate">evaluate</a></li>
  <li><a href="#gegenbauer-c" id="toc-gegenbauer-c" class="nav-link" data-scroll-target="#gegenbauer-c">gegenbauer-C</a></li>
  <li><a href="#hermite-h" id="toc-hermite-h" class="nav-link" data-scroll-target="#hermite-h">hermite-H</a></li>
  <li><a href="#hermite-he" id="toc-hermite-he" class="nav-link" data-scroll-target="#hermite-he">hermite-He</a></li>
  <li><a href="#ince-c" id="toc-ince-c" class="nav-link" data-scroll-target="#ince-c">ince-C</a></li>
  <li><a href="#ince-c-coeffs" id="toc-ince-c-coeffs" class="nav-link" data-scroll-target="#ince-c-coeffs">ince-C-coeffs</a></li>
  <li><a href="#ince-c-radial" id="toc-ince-c-radial" class="nav-link" data-scroll-target="#ince-c-radial">ince-C-radial</a></li>
  <li><a href="#ince-s" id="toc-ince-s" class="nav-link" data-scroll-target="#ince-s">ince-S</a></li>
  <li><a href="#ince-s-coeffs" id="toc-ince-s-coeffs" class="nav-link" data-scroll-target="#ince-s-coeffs">ince-S-coeffs</a></li>
  <li><a href="#ince-s-radial" id="toc-ince-s-radial" class="nav-link" data-scroll-target="#ince-s-radial">ince-S-radial</a></li>
  <li><a href="#jacobi-p" id="toc-jacobi-p" class="nav-link" data-scroll-target="#jacobi-p">jacobi-P</a></li>
  <li><a href="#laguerre-l" id="toc-laguerre-l" class="nav-link" data-scroll-target="#laguerre-l">laguerre-L</a></li>
  <li><a href="#legendre-p" id="toc-legendre-p" class="nav-link" data-scroll-target="#legendre-p">legendre-P</a></li>
  <li><a href="#makepoly" id="toc-makepoly" class="nav-link" data-scroll-target="#makepoly">makepoly</a></li>
  <li><a href="#meixner-pollaczek-p" id="toc-meixner-pollaczek-p" class="nav-link" data-scroll-target="#meixner-pollaczek-p">meixner-pollaczek-P</a></li>
  <li><a href="#mevalpoly-macro" id="toc-mevalpoly-macro" class="nav-link" data-scroll-target="#mevalpoly-macro">mevalpoly <sup><sub>MACRO</sub></sup></a></li>
  <li><a href="#mult" id="toc-mult" class="nav-link" data-scroll-target="#mult">mult</a></li>
  <li><a href="#polynomial-1" id="toc-polynomial-1" class="nav-link" data-scroll-target="#polynomial-1">polynomial</a></li>
  <li><a href="#ratio-polynomial" id="toc-ratio-polynomial" class="nav-link" data-scroll-target="#ratio-polynomial">ratio-polynomial</a></li>
  <li><a href="#scale" id="toc-scale" class="nav-link" data-scroll-target="#scale">scale</a></li>
  <li><a href="#sub" id="toc-sub" class="nav-link" data-scroll-target="#sub">sub</a></li>
  </ul></li>
  </ul></li>
  </ul>
</nav>
    </div>
<!-- main -->
<main class="content" id="quarto-document-content">

<header id="title-block-header" class="quarto-title-block default">
<div class="quarto-title">
<h1 class="title">Polynomials</h1>
</div>



<div class="quarto-title-meta">

    
  
    
  </div>
  


</header>


<style></style>
<style>.printedClojure .sourceCode {
  background-color: transparent;
  border-style: none;
}
</style>
<style>.clay-limit-image-width .clay-image {max-width: 100%}
.clay-side-by-side .sourceCode {margin: 0}
.clay-side-by-side {margin: 1em 0}
</style>
<script src="polynomials_files/md-default0.js" type="text/javascript"></script>
<script src="polynomials_files/md-default1.js" type="text/javascript"></script>
<div class="sourceClojure">
<div class="sourceCode" id="cb1"><pre class="sourceCode clojure code-with-copy"><code class="sourceCode clojure"><span id="cb1-1"><a href="#cb1-1" aria-hidden="true" tabindex="-1"></a>(<span class="kw">ns</span> polynomials</span>
<span id="cb1-2"><a href="#cb1-2" aria-hidden="true" tabindex="-1"></a></span>
<span id="cb1-3"><a href="#cb1-3" aria-hidden="true" tabindex="-1"></a>  (<span class="at">:require</span> [fastmath.polynomials <span class="at">:as</span> poly]</span>
<span id="cb1-4"><a href="#cb1-4" aria-hidden="true" tabindex="-1"></a>            [fastmath.dev.codox <span class="at">:as</span> codox]))</span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div>
</div>
<section id="reference" class="level2">
<h2 class="anchored" data-anchor-id="reference">Reference</h2>
<section id="fastmath.polynomials" class="level3">
<h3 class="anchored" data-anchor-id="fastmath.polynomials">fastmath.polynomials</h3>
<span id="#LOS-->Polynomial"></span>
<section id="polynomial" class="level4">
<h4 class="anchored" data-anchor-id="polynomial">-&gt;Polynomial</h4>
<ul>
<li><code>(-&gt;Polynomial cfs d)</code></li>
</ul>
<p>Positional factory function for class fastmath.polynomials.Polynomial.</p>
<div style="text-align: right"><small><a href="https://github.com/generateme/fastmath/tree/3.x/src/fastmath/polynomials.clj#L133">source</a></small><hr style="margin: 0"></div>
<span id="#LOS-->PolynomialR"></span>
</section>
<section id="polynomialr" class="level4">
<h4 class="anchored" data-anchor-id="polynomialr">-&gt;PolynomialR</h4>
<ul>
<li><code>(-&gt;PolynomialR cfs d)</code></li>
</ul>
<p>Positional factory function for class fastmath.polynomials.PolynomialR.</p>
<div style="text-align: right"><small><a href="https://github.com/generateme/fastmath/tree/3.x/src/fastmath/polynomials.clj#L193">source</a></small><hr style="margin: 0"></div>
<span id="#LOS-add"></span>
</section>
<section id="add" class="level4">
<h4 class="anchored" data-anchor-id="add">add</h4>
<ul>
<li><code>(add poly)</code></li>
<li><code>(add poly1 poly2)</code></li>
</ul>
<p>Add two polynomials.</p>
<div style="text-align: right"><small><a href="https://github.com/generateme/fastmath/tree/3.x/src/fastmath/polynomials.clj#L283">source</a></small><hr style="margin: 0"></div>
<span id="#LOS-bessel-t"></span>
</section>
<section id="bessel-t" class="level4">
<h4 class="anchored" data-anchor-id="bessel-t">bessel-t</h4>
<ul>
<li><code>(bessel-t degree)</code></li>
</ul>
<div style="text-align: right"><small><a href="https://github.com/generateme/fastmath/tree/3.x/src/fastmath/polynomials.clj#L735">source</a></small><hr style="margin: 0"></div>
<span id="#LOS-bessel-y"></span>
</section>
<section id="bessel-y" class="level4">
<h4 class="anchored" data-anchor-id="bessel-y">bessel-y</h4>
<ul>
<li><code>(bessel-y degree)</code></li>
</ul>
<div style="text-align: right"><small><a href="https://github.com/generateme/fastmath/tree/3.x/src/fastmath/polynomials.clj#L702">source</a></small><hr style="margin: 0"></div>
<span id="#LOS-chebyshev-T"></span>
</section>
<section id="chebyshev-t" class="level4">
<h4 class="anchored" data-anchor-id="chebyshev-t">chebyshev-T</h4>
<ul>
<li><code>(chebyshev-T degree)</code></li>
</ul>
<div style="text-align: right"><small><a href="https://github.com/generateme/fastmath/tree/3.x/src/fastmath/polynomials.clj#L385">source</a></small><hr style="margin: 0"></div>
<span id="#LOS-chebyshev-U"></span>
</section>
<section id="chebyshev-u" class="level4">
<h4 class="anchored" data-anchor-id="chebyshev-u">chebyshev-U</h4>
<ul>
<li><code>(chebyshev-U degree)</code></li>
</ul>
<div style="text-align: right"><small><a href="https://github.com/generateme/fastmath/tree/3.x/src/fastmath/polynomials.clj#L420">source</a></small><hr style="margin: 0"></div>
<span id="#LOS-chebyshev-V"></span>
</section>
<section id="chebyshev-v" class="level4">
<h4 class="anchored" data-anchor-id="chebyshev-v">chebyshev-V</h4>
<ul>
<li><code>(chebyshev-V degree)</code></li>
</ul>
<div style="text-align: right"><small><a href="https://github.com/generateme/fastmath/tree/3.x/src/fastmath/polynomials.clj#L443">source</a></small><hr style="margin: 0"></div>
<span id="#LOS-chebyshev-W"></span>
</section>
<section id="chebyshev-w" class="level4">
<h4 class="anchored" data-anchor-id="chebyshev-w">chebyshev-W</h4>
<ul>
<li><code>(chebyshev-W degree)</code></li>
</ul>
<div style="text-align: right"><small><a href="https://github.com/generateme/fastmath/tree/3.x/src/fastmath/polynomials.clj#L465">source</a></small><hr style="margin: 0"></div>
<span id="#LOS-coeffs"></span>
</section>
<section id="coeffs" class="level4">
<h4 class="anchored" data-anchor-id="coeffs">coeffs</h4>
<ul>
<li><code>(coeffs poly)</code></li>
</ul>
<p>Coefficients of polynomial</p>
<div style="text-align: right"><small><a href="https://github.com/generateme/fastmath/tree/3.x/src/fastmath/polynomials.clj#L304">source</a></small><hr style="margin: 0"></div>
<span id="#LOS-coeffs->polynomial"></span>
</section>
<section id="coeffs-polynomial" class="level4">
<h4 class="anchored" data-anchor-id="coeffs-polynomial">coeffs-&gt;polynomial</h4>
<ul>
<li><code>(coeffs-&gt;polynomial &amp; coeffs)</code></li>
</ul>
<p>Create polynomial object for unrolled coefficients.</p>
<div style="text-align: right"><small><a href="https://github.com/generateme/fastmath/tree/3.x/src/fastmath/polynomials.clj#L275">source</a></small><hr style="margin: 0"></div>
<span id="#LOS-coeffs->ratio-polynomial"></span>
</section>
<section id="coeffs-ratio-polynomial" class="level4">
<h4 class="anchored" data-anchor-id="coeffs-ratio-polynomial">coeffs-&gt;ratio-polynomial</h4>
<ul>
<li><code>(coeffs-&gt;ratio-polynomial &amp; coeffs)</code></li>
</ul>
<p>Create ratio based polynomial object for unrolled coefficients.</p>
<div style="text-align: right"><small><a href="https://github.com/generateme/fastmath/tree/3.x/src/fastmath/polynomials.clj#L279">source</a></small><hr style="margin: 0"></div>
<span id="#LOS-complex-evalpoly"></span>
</section>
<section id="complex-evalpoly" class="level4">
<h4 class="anchored" data-anchor-id="complex-evalpoly">complex-evalpoly</h4>
<ul>
<li><code>(complex-evalpoly x &amp; coeffs)</code></li>
</ul>
<p>Evaluate complex polynomial</p>
<div style="text-align: right"><small><a href="https://github.com/generateme/fastmath/tree/3.x/src/fastmath/polynomials.clj#L79">source</a></small><hr style="margin: 0"></div>
<span id="#LOS-complex-makepoly"></span>
</section>
<section id="complex-makepoly" class="level4">
<h4 class="anchored" data-anchor-id="complex-makepoly">complex-makepoly</h4>
<ul>
<li><code>(complex-makepoly coeffs)</code></li>
</ul>
<p>Create complex polynomial function for given coefficients</p>
<div style="text-align: right"><small><a href="https://github.com/generateme/fastmath/tree/3.x/src/fastmath/polynomials.clj#L92">source</a></small><hr style="margin: 0"></div>
<span id="#LOS-complex-mevalpoly"></span>
</section>
<section id="complex-mevalpoly-macro" class="level4">
<h4 class="anchored" data-anchor-id="complex-mevalpoly-macro">complex-mevalpoly <sup><sub>MACRO</sub></sup></h4>
<ul>
<li><code>(complex-mevalpoly x &amp; coeffs)</code></li>
</ul>
<p>Evaluate complex polynomial macro version in the form coeffs[0]+coeffs[1]<em>x+coeffs[2]</em>x^2+….</p>
<div style="text-align: right"><small><a href="https://github.com/generateme/fastmath/tree/3.x/src/fastmath/polynomials.clj#L68">source</a></small><hr style="margin: 0"></div>
<span id="#LOS-complex-muladd"></span>
</section>
<section id="complex-muladd" class="level4">
<h4 class="anchored" data-anchor-id="complex-muladd">complex-muladd</h4>
<ul>
<li><code>(complex-muladd x y z)</code></li>
</ul>
<p><code>(x y z)</code> -&gt; <code>(+ z (* x y))</code></p>
<div style="text-align: right"><small><a href="https://github.com/generateme/fastmath/tree/3.x/src/fastmath/polynomials.clj#L63">source</a></small><hr style="margin: 0"></div>
<span id="#LOS-degree"></span>
</section>
<section id="degree" class="level4">
<h4 class="anchored" data-anchor-id="degree">degree</h4>
<ul>
<li><code>(degree poly)</code></li>
</ul>
<div style="text-align: right"><small><a href="https://github.com/generateme/fastmath/tree/3.x/src/fastmath/polynomials.clj#L308">source</a></small><hr style="margin: 0"></div>
<span id="#LOS-derivative"></span>
</section>
<section id="derivative" class="level4">
<h4 class="anchored" data-anchor-id="derivative">derivative</h4>
<ul>
<li><code>(derivative poly)</code></li>
<li><code>(derivative poly order)</code></li>
</ul>
<p>Derivative of the polynomial.</p>
<div style="text-align: right"><small><a href="https://github.com/generateme/fastmath/tree/3.x/src/fastmath/polynomials.clj#L311">source</a></small><hr style="margin: 0"></div>
<span id="#LOS-eval-bessel-t"></span>
</section>
<section id="eval-bessel-t" class="level4">
<h4 class="anchored" data-anchor-id="eval-bessel-t">eval-bessel-t</h4>
<ul>
<li><code>(eval-bessel-t degree x)</code></li>
</ul>
<div style="text-align: right"><small><a href="https://github.com/generateme/fastmath/tree/3.x/src/fastmath/polynomials.clj#L706">source</a></small><hr style="margin: 0"></div>
<span id="#LOS-eval-bessel-y"></span>
</section>
<section id="eval-bessel-y" class="level4">
<h4 class="anchored" data-anchor-id="eval-bessel-y">eval-bessel-y</h4>
<ul>
<li><code>(eval-bessel-y degree x)</code></li>
</ul>
<div style="text-align: right"><small><a href="https://github.com/generateme/fastmath/tree/3.x/src/fastmath/polynomials.clj#L674">source</a></small><hr style="margin: 0"></div>
<span id="#LOS-eval-chebyshev-T"></span>
</section>
<section id="eval-chebyshev-t" class="level4">
<h4 class="anchored" data-anchor-id="eval-chebyshev-t">eval-chebyshev-T</h4>
<ul>
<li><code>(eval-chebyshev-T degree x)</code></li>
</ul>
<p>Chebyshev polynomial of the first kind</p>
<div style="text-align: right"><small><a href="https://github.com/generateme/fastmath/tree/3.x/src/fastmath/polynomials.clj#L361">source</a></small><hr style="margin: 0"></div>
<span id="#LOS-eval-chebyshev-U"></span>
</section>
<section id="eval-chebyshev-u" class="level4">
<h4 class="anchored" data-anchor-id="eval-chebyshev-u">eval-chebyshev-U</h4>
<ul>
<li><code>(eval-chebyshev-U degree x)</code></li>
</ul>
<p>Chebyshev polynomials of the second kind</p>
<div style="text-align: right"><small><a href="https://github.com/generateme/fastmath/tree/3.x/src/fastmath/polynomials.clj#L389">source</a></small><hr style="margin: 0"></div>
<span id="#LOS-eval-chebyshev-V"></span>
</section>
<section id="eval-chebyshev-v" class="level4">
<h4 class="anchored" data-anchor-id="eval-chebyshev-v">eval-chebyshev-V</h4>
<ul>
<li><code>(eval-chebyshev-V degree x)</code></li>
</ul>
<p>Chebyshev polynomials of the third kind</p>
<div style="text-align: right"><small><a href="https://github.com/generateme/fastmath/tree/3.x/src/fastmath/polynomials.clj#L424">source</a></small><hr style="margin: 0"></div>
<span id="#LOS-eval-chebyshev-W"></span>
</section>
<section id="eval-chebyshev-w" class="level4">
<h4 class="anchored" data-anchor-id="eval-chebyshev-w">eval-chebyshev-W</h4>
<ul>
<li><code>(eval-chebyshev-W degree x)</code></li>
</ul>
<p>Chebyshev polynomials of the fourth kind</p>
<div style="text-align: right"><small><a href="https://github.com/generateme/fastmath/tree/3.x/src/fastmath/polynomials.clj#L447">source</a></small><hr style="margin: 0"></div>
<span id="#LOS-eval-gegenbauer-C"></span>
</section>
<section id="eval-gegenbauer-c" class="level4">
<h4 class="anchored" data-anchor-id="eval-gegenbauer-c">eval-gegenbauer-C</h4>
<ul>
<li><code>(eval-gegenbauer-C degree x)</code></li>
<li><code>(eval-gegenbauer-C degree order x)</code></li>
</ul>
<p>Gegenbauer (ultraspherical) polynomials</p>
<div style="text-align: right"><small><a href="https://github.com/generateme/fastmath/tree/3.x/src/fastmath/polynomials.clj#L505">source</a></small><hr style="margin: 0"></div>
<span id="#LOS-eval-hermite-H"></span>
</section>
<section id="eval-hermite-h" class="level4">
<h4 class="anchored" data-anchor-id="eval-hermite-h">eval-hermite-H</h4>
<ul>
<li><code>(eval-hermite-H degree x)</code></li>
</ul>
<p>Hermite polynomials</p>
<div style="text-align: right"><small><a href="https://github.com/generateme/fastmath/tree/3.x/src/fastmath/polynomials.clj#L550">source</a></small><hr style="margin: 0"></div>
<span id="#LOS-eval-hermite-He"></span>
</section>
<section id="eval-hermite-he" class="level4">
<h4 class="anchored" data-anchor-id="eval-hermite-he">eval-hermite-He</h4>
<ul>
<li><code>(eval-hermite-He degree x)</code></li>
</ul>
<p>Hermite polynomials</p>
<div style="text-align: right"><small><a href="https://github.com/generateme/fastmath/tree/3.x/src/fastmath/polynomials.clj#L584">source</a></small><hr style="margin: 0"></div>
<span id="#LOS-eval-jacobi-P"></span>
</section>
<section id="eval-jacobi-p" class="level4">
<h4 class="anchored" data-anchor-id="eval-jacobi-p">eval-jacobi-P</h4>
<ul>
<li><code>(eval-jacobi-P degree alpha beta x)</code></li>
</ul>
<p>Jacobi polynomials</p>
<div style="text-align: right"><small><a href="https://github.com/generateme/fastmath/tree/3.x/src/fastmath/polynomials.clj#L621">source</a></small><hr style="margin: 0"></div>
<span id="#LOS-eval-laguerre-L"></span>
</section>
<section id="eval-laguerre-l" class="level4">
<h4 class="anchored" data-anchor-id="eval-laguerre-l">eval-laguerre-L</h4>
<ul>
<li><code>(eval-laguerre-L degree x)</code></li>
<li><code>(eval-laguerre-L degree order x)</code></li>
</ul>
<p>Evaluate generalized Laguerre polynomial</p>
<div style="text-align: right"><small><a href="https://github.com/generateme/fastmath/tree/3.x/src/fastmath/polynomials.clj#L323">source</a></small><hr style="margin: 0"></div>
<span id="#LOS-eval-legendre-P"></span>
</section>
<section id="eval-legendre-p" class="level4">
<h4 class="anchored" data-anchor-id="eval-legendre-p">eval-legendre-P</h4>
<ul>
<li><code>(eval-legendre-P degree x)</code></li>
</ul>
<div style="text-align: right"><small><a href="https://github.com/generateme/fastmath/tree/3.x/src/fastmath/polynomials.clj#L471">source</a></small><hr style="margin: 0"></div>
<span id="#LOS-eval-meixner-pollaczek-P"></span>
</section>
<section id="eval-meixner-pollaczek-p" class="level4">
<h4 class="anchored" data-anchor-id="eval-meixner-pollaczek-p">eval-meixner-pollaczek-P</h4>
<ul>
<li><code>(eval-meixner-pollaczek-P degree lambda phi x)</code></li>
</ul>
<div style="text-align: right"><small><a href="https://github.com/generateme/fastmath/tree/3.x/src/fastmath/polynomials.clj#L741">source</a></small><hr style="margin: 0"></div>
<span id="#LOS-evalpoly"></span>
</section>
<section id="evalpoly" class="level4">
<h4 class="anchored" data-anchor-id="evalpoly">evalpoly</h4>
<ul>
<li><code>(evalpoly x &amp; coeffs)</code></li>
</ul>
<p>Evaluate polynomial for given coefficients</p>
<div style="text-align: right"><small><a href="https://github.com/generateme/fastmath/tree/3.x/src/fastmath/polynomials.clj#L28">source</a></small><hr style="margin: 0"></div>
<span id="#LOS-evaluate"></span>
</section>
<section id="evaluate" class="level4">
<h4 class="anchored" data-anchor-id="evaluate">evaluate</h4>
<ul>
<li><code>(evaluate poly x)</code></li>
</ul>
<p>Evaluate polynomial</p>
<div style="text-align: right"><small><a href="https://github.com/generateme/fastmath/tree/3.x/src/fastmath/polynomials.clj#L316">source</a></small><hr style="margin: 0"></div>
<span id="#LOS-gegenbauer-C"></span>
</section>
<section id="gegenbauer-c" class="level4">
<h4 class="anchored" data-anchor-id="gegenbauer-c">gegenbauer-C</h4>
<ul>
<li><code>(gegenbauer-C degree)</code></li>
<li><code>(gegenbauer-C degree order)</code></li>
</ul>
<div style="text-align: right"><small><a href="https://github.com/generateme/fastmath/tree/3.x/src/fastmath/polynomials.clj#L544">source</a></small><hr style="margin: 0"></div>
<span id="#LOS-hermite-H"></span>
</section>
<section id="hermite-h" class="level4">
<h4 class="anchored" data-anchor-id="hermite-h">hermite-H</h4>
<ul>
<li><code>(hermite-H degree)</code></li>
</ul>
<div style="text-align: right"><small><a href="https://github.com/generateme/fastmath/tree/3.x/src/fastmath/polynomials.clj#L580">source</a></small><hr style="margin: 0"></div>
<span id="#LOS-hermite-He"></span>
</section>
<section id="hermite-he" class="level4">
<h4 class="anchored" data-anchor-id="hermite-he">hermite-He</h4>
<ul>
<li><code>(hermite-He degree)</code></li>
</ul>
<div style="text-align: right"><small><a href="https://github.com/generateme/fastmath/tree/3.x/src/fastmath/polynomials.clj#L614">source</a></small><hr style="margin: 0"></div>
<span id="#LOS-ince-C"></span>
</section>
<section id="ince-c" class="level4">
<h4 class="anchored" data-anchor-id="ince-c">ince-C</h4>
<ul>
<li><code>(ince-C p m e)</code></li>
<li><code>(ince-C p m e normalization)</code></li>
</ul>
<p>Ince C polynomial of order p and degree m.</p>
<p><code>normalization</code> parameter can be <code>:none</code> (default), <code>:trigonometric</code> or <code>millers</code>.</p>
<div style="text-align: right"><small><a href="https://github.com/generateme/fastmath/tree/3.x/src/fastmath/polynomials.clj#L922">source</a></small><hr style="margin: 0"></div>
<span id="#LOS-ince-C-coeffs"></span>
</section>
<section id="ince-c-coeffs" class="level4">
<h4 class="anchored" data-anchor-id="ince-c-coeffs">ince-C-coeffs</h4>
<ul>
<li><code>(ince-C-coeffs p m e normalization)</code></li>
</ul>
<div style="text-align: right"><small><a href="https://github.com/generateme/fastmath/tree/3.x/src/fastmath/polynomials.clj#L899">source</a></small><hr style="margin: 0"></div>
<span id="#LOS-ince-C-radial"></span>
</section>
<section id="ince-c-radial" class="level4">
<h4 class="anchored" data-anchor-id="ince-c-radial">ince-C-radial</h4>
<ul>
<li><code>(ince-C-radial p m e)</code></li>
<li><code>(ince-C-radial p m e normalization)</code></li>
</ul>
<p>Ince C polynomial of order p and degree m.</p>
<p><code>normalization</code> parameter can be <code>:none</code> (default), <code>:trigonometric</code> or <code>millers</code>.</p>
<div style="text-align: right"><small><a href="https://github.com/generateme/fastmath/tree/3.x/src/fastmath/polynomials.clj#L956">source</a></small><hr style="margin: 0"></div>
<span id="#LOS-ince-S"></span>
</section>
<section id="ince-s" class="level4">
<h4 class="anchored" data-anchor-id="ince-s">ince-S</h4>
<ul>
<li><code>(ince-S p m e)</code></li>
<li><code>(ince-S p m e normalization)</code></li>
</ul>
<p>Ince S polynomial of order p and degree m.</p>
<p><code>normalization</code> parameter can be <code>:none</code> (default), <code>:trigonometric</code> or <code>millers</code>.</p>
<div style="text-align: right"><small><a href="https://github.com/generateme/fastmath/tree/3.x/src/fastmath/polynomials.clj#L940">source</a></small><hr style="margin: 0"></div>
<span id="#LOS-ince-S-coeffs"></span>
</section>
<section id="ince-s-coeffs" class="level4">
<h4 class="anchored" data-anchor-id="ince-s-coeffs">ince-S-coeffs</h4>
<ul>
<li><code>(ince-S-coeffs p m e normalization)</code></li>
</ul>
<div style="text-align: right"><small><a href="https://github.com/generateme/fastmath/tree/3.x/src/fastmath/polynomials.clj#L905">source</a></small><hr style="margin: 0"></div>
<span id="#LOS-ince-S-radial"></span>
</section>
<section id="ince-s-radial" class="level4">
<h4 class="anchored" data-anchor-id="ince-s-radial">ince-S-radial</h4>
<ul>
<li><code>(ince-S-radial p m e)</code></li>
<li><code>(ince-S-radial p m e normalization)</code></li>
</ul>
<p>Ince S polynomial of order p and degree m.</p>
<p><code>normalization</code> parameter can be <code>:none</code> (default), <code>:trigonometric</code> or <code>millers</code>.</p>
<div style="text-align: right"><small><a href="https://github.com/generateme/fastmath/tree/3.x/src/fastmath/polynomials.clj#L972">source</a></small><hr style="margin: 0"></div>
<span id="#LOS-jacobi-P"></span>
</section>
<section id="jacobi-p" class="level4">
<h4 class="anchored" data-anchor-id="jacobi-p">jacobi-P</h4>
<ul>
<li><code>(jacobi-P degree alpha beta)</code></li>
</ul>
<div style="text-align: right"><small><a href="https://github.com/generateme/fastmath/tree/3.x/src/fastmath/polynomials.clj#L668">source</a></small><hr style="margin: 0"></div>
<span id="#LOS-laguerre-L"></span>
</section>
<section id="laguerre-l" class="level4">
<h4 class="anchored" data-anchor-id="laguerre-l">laguerre-L</h4>
<ul>
<li><code>(laguerre-L degree)</code></li>
<li><code>(laguerre-L degree order)</code></li>
</ul>
<p>Generalized Laguerre polynomials</p>
<div style="text-align: right"><small><a href="https://github.com/generateme/fastmath/tree/3.x/src/fastmath/polynomials.clj#L353">source</a></small><hr style="margin: 0"></div>
<span id="#LOS-legendre-P"></span>
</section>
<section id="legendre-p" class="level4">
<h4 class="anchored" data-anchor-id="legendre-p">legendre-P</h4>
<ul>
<li><code>(legendre-P degree)</code></li>
</ul>
<div style="text-align: right"><small><a href="https://github.com/generateme/fastmath/tree/3.x/src/fastmath/polynomials.clj#L499">source</a></small><hr style="margin: 0"></div>
<span id="#LOS-makepoly"></span>
</section>
<section id="makepoly" class="level4">
<h4 class="anchored" data-anchor-id="makepoly">makepoly</h4>
<ul>
<li><code>(makepoly coeffs)</code></li>
</ul>
<p>Create polynomial function for given coefficients</p>
<div style="text-align: right"><small><a href="https://github.com/generateme/fastmath/tree/3.x/src/fastmath/polynomials.clj#L44">source</a></small><hr style="margin: 0"></div>
<span id="#LOS-meixner-pollaczek-P"></span>
</section>
<section id="meixner-pollaczek-p" class="level4">
<h4 class="anchored" data-anchor-id="meixner-pollaczek-p">meixner-pollaczek-P</h4>
<ul>
<li><code>(meixner-pollaczek-P degree lambda phi)</code></li>
</ul>
<div style="text-align: right"><small><a href="https://github.com/generateme/fastmath/tree/3.x/src/fastmath/polynomials.clj#L781">source</a></small><hr style="margin: 0"></div>
<span id="#LOS-mevalpoly"></span>
</section>
<section id="mevalpoly-macro" class="level4">
<h4 class="anchored" data-anchor-id="mevalpoly-macro">mevalpoly <sup><sub>MACRO</sub></sup></h4>
<ul>
<li><code>(mevalpoly x &amp; coeffs)</code></li>
</ul>
<p>Evaluate polynomial macro version in the form coeffs[0]+coeffs[1]<em>x+coeffs[2]</em>x^2+….</p>
<div style="text-align: right"><small><a href="https://github.com/generateme/fastmath/tree/3.x/src/fastmath/polynomials.clj#L17">source</a></small><hr style="margin: 0"></div>
<span id="#LOS-mult"></span>
</section>
<section id="mult" class="level4">
<h4 class="anchored" data-anchor-id="mult">mult</h4>
<ul>
<li><code>(mult poly)</code></li>
<li><code>(mult poly1 poly2)</code></li>
</ul>
<p>Multiply two polynomials.</p>
<div style="text-align: right"><small><a href="https://github.com/generateme/fastmath/tree/3.x/src/fastmath/polynomials.clj#L298">source</a></small><hr style="margin: 0"></div>
<span id="#LOS-polynomial"></span>
</section>
<section id="polynomial-1" class="level4">
<h4 class="anchored" data-anchor-id="polynomial-1">polynomial</h4>
<ul>
<li><code>(polynomial coeffs)</code></li>
</ul>
<p>Create polynomial object.</p>
<div style="text-align: right"><small><a href="https://github.com/generateme/fastmath/tree/3.x/src/fastmath/polynomials.clj#L265">source</a></small><hr style="margin: 0"></div>
<span id="#LOS-ratio-polynomial"></span>
</section>
<section id="ratio-polynomial" class="level4">
<h4 class="anchored" data-anchor-id="ratio-polynomial">ratio-polynomial</h4>
<ul>
<li><code>(ratio-polynomial coeffs)</code></li>
</ul>
<p>Create polynomial operating on ratios.</p>
<div style="text-align: right"><small><a href="https://github.com/generateme/fastmath/tree/3.x/src/fastmath/polynomials.clj#L270">source</a></small><hr style="margin: 0"></div>
<span id="#LOS-scale"></span>
</section>
<section id="scale" class="level4">
<h4 class="anchored" data-anchor-id="scale">scale</h4>
<ul>
<li><code>(scale poly v)</code></li>
</ul>
<p>Multiply polynomial by scalar</p>
<div style="text-align: right"><small><a href="https://github.com/generateme/fastmath/tree/3.x/src/fastmath/polynomials.clj#L294">source</a></small><hr style="margin: 0"></div>
<span id="#LOS-sub"></span>
</section>
<section id="sub" class="level4">
<h4 class="anchored" data-anchor-id="sub">sub</h4>
<ul>
<li><code>(sub poly)</code></li>
<li><code>(sub poly1 poly2)</code></li>
</ul>
<p>Subtract two polynomials</p>
<div style="text-align: right"><small><a href="https://github.com/generateme/fastmath/tree/3.x/src/fastmath/polynomials.clj#L288">source</a></small><hr style="margin: 0"></div>
<div style="background-color:grey;height:2px;width:100%;"></div>
<div><pre><small><small>source: <a href="https://github.com/generateme/fastmath//blob/master/clay/polynomials.clj">clay/polynomials.clj</a></small></small></pre></div>


</section>
</section>
</section>

</main> <!-- /main -->
<script id="quarto-html-after-body" type="application/javascript">
window.document.addEventListener("DOMContentLoaded", function (event) {
  const toggleBodyColorMode = (bsSheetEl) => {
    const mode = bsSheetEl.getAttribute("data-mode");
    const bodyEl = window.document.querySelector("body");
    if (mode === "dark") {
      bodyEl.classList.add("quarto-dark");
      bodyEl.classList.remove("quarto-light");
    } else {
      bodyEl.classList.add("quarto-light");
      bodyEl.classList.remove("quarto-dark");
    }
  }
  const toggleBodyColorPrimary = () => {
    const bsSheetEl = window.document.querySelector("link#quarto-bootstrap");
    if (bsSheetEl) {
      toggleBodyColorMode(bsSheetEl);
    }
  }
  toggleBodyColorPrimary();  
  const icon = "";
  const anchorJS = new window.AnchorJS();
  anchorJS.options = {
    placement: 'right',
    icon: icon
  };
  anchorJS.add('.anchored');
  const isCodeAnnotation = (el) => {
    for (const clz of el.classList) {
      if (clz.startsWith('code-annotation-')) {                     
        return true;
      }
    }
    return false;
  }
  const clipboard = new window.ClipboardJS('.code-copy-button', {
    text: function(trigger) {
      const codeEl = trigger.previousElementSibling.cloneNode(true);
      for (const childEl of codeEl.children) {
        if (isCodeAnnotation(childEl)) {
          childEl.remove();
        }
      }
      return codeEl.innerText;
    }
  });
  clipboard.on('success', function(e) {
    // button target
    const button = e.trigger;
    // don't keep focus
    button.blur();
    // flash "checked"
    button.classList.add('code-copy-button-checked');
    var currentTitle = button.getAttribute("title");
    button.setAttribute("title", "Copied!");
    let tooltip;
    if (window.bootstrap) {
      button.setAttribute("data-bs-toggle", "tooltip");
      button.setAttribute("data-bs-placement", "left");
      button.setAttribute("data-bs-title", "Copied!");
      tooltip = new bootstrap.Tooltip(button, 
        { trigger: "manual", 
          customClass: "code-copy-button-tooltip",
          offset: [0, -8]});
      tooltip.show();    
    }
    setTimeout(function() {
      if (tooltip) {
        tooltip.hide();
        button.removeAttribute("data-bs-title");
        button.removeAttribute("data-bs-toggle");
        button.removeAttribute("data-bs-placement");
      }
      button.setAttribute("title", currentTitle);
      button.classList.remove('code-copy-button-checked');
    }, 1000);
    // clear code selection
    e.clearSelection();
  });
  function tippyHover(el, contentFn, onTriggerFn, onUntriggerFn) {
    const config = {
      allowHTML: true,
      maxWidth: 500,
      delay: 100,
      arrow: false,
      appendTo: function(el) {
          return el.parentElement;
      },
      interactive: true,
      interactiveBorder: 10,
      theme: 'quarto',
      placement: 'bottom-start',
    };
    if (contentFn) {
      config.content = contentFn;
    }
    if (onTriggerFn) {
      config.onTrigger = onTriggerFn;
    }
    if (onUntriggerFn) {
      config.onUntrigger = onUntriggerFn;
    }
    window.tippy(el, config); 
  }
  const noterefs = window.document.querySelectorAll('a[role="doc-noteref"]');
  for (var i=0; i<noterefs.length; i++) {
    const ref = noterefs[i];
    tippyHover(ref, function() {
      // use id or data attribute instead here
      let href = ref.getAttribute('data-footnote-href') || ref.getAttribute('href');
      try { href = new URL(href).hash; } catch {}
      const id = href.replace(/^#\/?/, "");
      const note = window.document.getElementById(id);
      return note.innerHTML;
    });
  }
  const xrefs = window.document.querySelectorAll('a.quarto-xref');
  const processXRef = (id, note) => {
    // Strip column container classes
    const stripColumnClz = (el) => {
      el.classList.remove("page-full", "page-columns");
      if (el.children) {
        for (const child of el.children) {
          stripColumnClz(child);
        }
      }
    }
    stripColumnClz(note)
    if (id === null || id.startsWith('sec-')) {
      // Special case sections, only their first couple elements
      const container = document.createElement("div");
      if (note.children && note.children.length > 2) {
        container.appendChild(note.children[0].cloneNode(true));
        for (let i = 1; i < note.children.length; i++) {
          const child = note.children[i];
          if (child.tagName === "P" && child.innerText === "") {
            continue;
          } else {
            container.appendChild(child.cloneNode(true));
            break;
          }
        }
        if (window.Quarto?.typesetMath) {
          window.Quarto.typesetMath(container);
        }
        return container.innerHTML
      } else {
        if (window.Quarto?.typesetMath) {
          window.Quarto.typesetMath(note);
        }
        return note.innerHTML;
      }
    } else {
      // Remove any anchor links if they are present
      const anchorLink = note.querySelector('a.anchorjs-link');
      if (anchorLink) {
        anchorLink.remove();
      }
      if (window.Quarto?.typesetMath) {
        window.Quarto.typesetMath(note);
      }
      // TODO in 1.5, we should make sure this works without a callout special case
      if (note.classList.contains("callout")) {
        return note.outerHTML;
      } else {
        return note.innerHTML;
      }
    }
  }
  for (var i=0; i<xrefs.length; i++) {
    const xref = xrefs[i];
    tippyHover(xref, undefined, function(instance) {
      instance.disable();
      let url = xref.getAttribute('href');
      let hash = undefined; 
      if (url.startsWith('#')) {
        hash = url;
      } else {
        try { hash = new URL(url).hash; } catch {}
      }
      if (hash) {
        const id = hash.replace(/^#\/?/, "");
        const note = window.document.getElementById(id);
        if (note !== null) {
          try {
            const html = processXRef(id, note.cloneNode(true));
            instance.setContent(html);
          } finally {
            instance.enable();
            instance.show();
          }
        } else {
          // See if we can fetch this
          fetch(url.split('#')[0])
          .then(res => res.text())
          .then(html => {
            const parser = new DOMParser();
            const htmlDoc = parser.parseFromString(html, "text/html");
            const note = htmlDoc.getElementById(id);
            if (note !== null) {
              const html = processXRef(id, note);
              instance.setContent(html);
            } 
          }).finally(() => {
            instance.enable();
            instance.show();
          });
        }
      } else {
        // See if we can fetch a full url (with no hash to target)
        // This is a special case and we should probably do some content thinning / targeting
        fetch(url)
        .then(res => res.text())
        .then(html => {
          const parser = new DOMParser();
          const htmlDoc = parser.parseFromString(html, "text/html");
          const note = htmlDoc.querySelector('main.content');
          if (note !== null) {
            // This should only happen for chapter cross references
            // (since there is no id in the URL)
            // remove the first header
            if (note.children.length > 0 && note.children[0].tagName === "HEADER") {
              note.children[0].remove();
            }
            const html = processXRef(null, note);
            instance.setContent(html);
          } 
        }).finally(() => {
          instance.enable();
          instance.show();
        });
      }
    }, function(instance) {
    });
  }
      let selectedAnnoteEl;
      const selectorForAnnotation = ( cell, annotation) => {
        let cellAttr = 'data-code-cell="' + cell + '"';
        let lineAttr = 'data-code-annotation="' +  annotation + '"';
        const selector = 'span[' + cellAttr + '][' + lineAttr + ']';
        return selector;
      }
      const selectCodeLines = (annoteEl) => {
        const doc = window.document;
        const targetCell = annoteEl.getAttribute("data-target-cell");
        const targetAnnotation = annoteEl.getAttribute("data-target-annotation");
        const annoteSpan = window.document.querySelector(selectorForAnnotation(targetCell, targetAnnotation));
        const lines = annoteSpan.getAttribute("data-code-lines").split(",");
        const lineIds = lines.map((line) => {
          return targetCell + "-" + line;
        })
        let top = null;
        let height = null;
        let parent = null;
        if (lineIds.length > 0) {
            //compute the position of the single el (top and bottom and make a div)
            const el = window.document.getElementById(lineIds[0]);
            top = el.offsetTop;
            height = el.offsetHeight;
            parent = el.parentElement.parentElement;
          if (lineIds.length > 1) {
            const lastEl = window.document.getElementById(lineIds[lineIds.length - 1]);
            const bottom = lastEl.offsetTop + lastEl.offsetHeight;
            height = bottom - top;
          }
          if (top !== null && height !== null && parent !== null) {
            // cook up a div (if necessary) and position it 
            let div = window.document.getElementById("code-annotation-line-highlight");
            if (div === null) {
              div = window.document.createElement("div");
              div.setAttribute("id", "code-annotation-line-highlight");
              div.style.position = 'absolute';
              parent.appendChild(div);
            }
            div.style.top = top - 2 + "px";
            div.style.height = height + 4 + "px";
            div.style.left = 0;
            let gutterDiv = window.document.getElementById("code-annotation-line-highlight-gutter");
            if (gutterDiv === null) {
              gutterDiv = window.document.createElement("div");
              gutterDiv.setAttribute("id", "code-annotation-line-highlight-gutter");
              gutterDiv.style.position = 'absolute';
              const codeCell = window.document.getElementById(targetCell);
              const gutter = codeCell.querySelector('.code-annotation-gutter');
              gutter.appendChild(gutterDiv);
            }
            gutterDiv.style.top = top - 2 + "px";
            gutterDiv.style.height = height + 4 + "px";
          }
          selectedAnnoteEl = annoteEl;
        }
      };
      const unselectCodeLines = () => {
        const elementsIds = ["code-annotation-line-highlight", "code-annotation-line-highlight-gutter"];
        elementsIds.forEach((elId) => {
          const div = window.document.getElementById(elId);
          if (div) {
            div.remove();
          }
        });
        selectedAnnoteEl = undefined;
      };
        // Handle positioning of the toggle
    window.addEventListener(
      "resize",
      throttle(() => {
        elRect = undefined;
        if (selectedAnnoteEl) {
          selectCodeLines(selectedAnnoteEl);
        }
      }, 10)
    );
    function throttle(fn, ms) {
    let throttle = false;
    let timer;
      return (...args) => {
        if(!throttle) { // first call gets through
            fn.apply(this, args);
            throttle = true;
        } else { // all the others get throttled
            if(timer) clearTimeout(timer); // cancel #2
            timer = setTimeout(() => {
              fn.apply(this, args);
              timer = throttle = false;
            }, ms);
        }
      };
    }
      // Attach click handler to the DT
      const annoteDls = window.document.querySelectorAll('dt[data-target-cell]');
      for (const annoteDlNode of annoteDls) {
        annoteDlNode.addEventListener('click', (event) => {
          const clickedEl = event.target;
          if (clickedEl !== selectedAnnoteEl) {
            unselectCodeLines();
            const activeEl = window.document.querySelector('dt[data-target-cell].code-annotation-active');
            if (activeEl) {
              activeEl.classList.remove('code-annotation-active');
            }
            selectCodeLines(clickedEl);
            clickedEl.classList.add('code-annotation-active');
          } else {
            // Unselect the line
            unselectCodeLines();
            clickedEl.classList.remove('code-annotation-active');
          }
        });
      }
  const findCites = (el) => {
    const parentEl = el.parentElement;
    if (parentEl) {
      const cites = parentEl.dataset.cites;
      if (cites) {
        return {
          el,
          cites: cites.split(' ')
        };
      } else {
        return findCites(el.parentElement)
      }
    } else {
      return undefined;
    }
  };
  var bibliorefs = window.document.querySelectorAll('a[role="doc-biblioref"]');
  for (var i=0; i<bibliorefs.length; i++) {
    const ref = bibliorefs[i];
    const citeInfo = findCites(ref);
    if (citeInfo) {
      tippyHover(citeInfo.el, function() {
        var popup = window.document.createElement('div');
        citeInfo.cites.forEach(function(cite) {
          var citeDiv = window.document.createElement('div');
          citeDiv.classList.add('hanging-indent');
          citeDiv.classList.add('csl-entry');
          var biblioDiv = window.document.getElementById('ref-' + cite);
          if (biblioDiv) {
            citeDiv.innerHTML = biblioDiv.innerHTML;
          }
          popup.appendChild(citeDiv);
        });
        return popup.innerHTML;
      });
    }
  }
});
</script>
<nav class="page-navigation">
  <div class="nav-page nav-page-previous">
      <a href="./stats.html" class="pagination-link" aria-label="Statistics">
        <i class="bi bi-arrow-left-short"></i> <span class="nav-page-text">Statistics</span>
      </a>          
  </div>
  <div class="nav-page nav-page-next">
      <a href="./special.html" class="pagination-link" aria-label="Special functions">
        <span class="nav-page-text">Special functions</span> <i class="bi bi-arrow-right-short"></i>
      </a>
  </div>
</nav>
</div> <!-- /content -->




</body></html>